/**
 * Created by dpliuja on 2017/9/26.
 */
import { Vue, VueRouter, ElementUI } from 'js/base'
import NavTitle from '../../components/homeComponents/NavTitle'
import MarketContent from './index.vue'
import AddDistributor from './pages/addDistributor'
import Index from './pages/indexList'
import './scss/index.css'
const router = new VueRouter({
  // base: '/marketing',
  // mode: 'history',
  routes: [
    {
      path: '/',
      component: Index
    },
    {
      name: 'search',
      path: '/search/:keyword',
      component: AddDistributor
    },
    {
      path: '*',
      redirect: '/' // 输入其他不存在的地址自动跳回首页
    }
  ]
})
new Vue({
  router,
  ElementUI,
  template: `<div class="markeitng_views">
              <NavTitle></NavTitle>
              <MarketContent></MarketContent>
             </div>`,
  components: {
    NavTitle,
    MarketContent
  }
}).$mount('#app')
